package libofei.controller.exception;

import libofei.common.controller.BaseController;
import org.springframework.boot.web.server.ErrorPage;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;


/** *
 * @Description 全局捕获异常类
 * @Author LIBOFEI
 * @Date 15:19 2020/5/27
 * @Version  1.0
**/
@ControllerAdvice
public class GlobalCatchException extends BaseController {

    //发生异常返回500
    private static final String ERROR_500 = getViewPath("/common/500");//500界面


    @ExceptionHandler(Exception.class)
    public String resultError(){

        return ERROR_500;
    }

}
